package com.zdsoft.finance.product.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.zdsoft.finance.common.base.CustomRepository;
import com.zdsoft.finance.product.entity.ProductFeeItem;

/**
 * 产品费用项操作仓库
 * @author longwei
 * @date 2016/11/21
 * @version 1.0
 */
public interface ProductFeeItemRepository extends CustomRepository<ProductFeeItem, String>{

	/**
	 * 通过产品id查询费用列表
	 * @param productId 产品id
	 * @param pageable 分页信息
	 * @return 分页对象
	 */
	@Query("select t from ProductFeeItem t where t.product.id=:productId and t.isDeleted=false")
	public Page<ProductFeeItem> findByProductId(@Param("productId")String productId,Pageable pageable);
}
